Many applications contain event
driven parts for example, an application that lets
users upload images. When that event takes place, the image
might need to be processed in a few different ways, like converting the image
to a standard format, converting a thumbnail into different sizes, and
storing each new file in a repository. This function could be integrated
into the application, but then you'd have to provide
compute resources for it, whether it happens once a millisecond or
once a day. With Cloud Functions,
you write a single purpose function that completes the necessary image
manipulations and then arrange for it to automatically run whenever
a new image is uploaded. Cloud Functions is a lightweight,
event-based, asynchronous compute solution that allows you to create small,
single-purpose functions that respond to cloud events without the need to manage
a server or a runtime environment. These functions can be used to construct
application workflows from individual business logic tasks. Cloud Functions can also connect and
extend Cloud Services your build to the nearest 100 milliseconds, but
only while your code is running. Cloud Functions supports writing source
code in a number of programming languages. These include Node.JS, Python, Go, Java, .Net Core, Ruby and PHP. For more information about
the supported specific versions, refer to the runtime's documentation. Events from Cloud Storage and PubSub can
trigger Cloud Functions asynchronously or you can use HTTP invocation for
synchronous execution.